package com.xiaoshuidi.cloud.module.member.mapper.securitycheck;


import com.xiaoshuidi.cloud.framework.common.pojo.PageResult;
import com.xiaoshuidi.cloud.framework.mybatis.core.query.LambdaQueryWrapperX;
import com.xiaoshuidi.cloud.framework.mybatis.core.mapper.BaseMapperX;
import com.xiaoshuidi.cloud.module.member.controller.admin.securitycheck.vo.SecurityCheckRectificationFilePageReqVO;
import com.xiaoshuidi.cloud.module.member.pojo.securitycheck.SecurityCheckRectificationFileDO;
import org.apache.ibatis.annotations.Mapper;


/**
 * 安全检查整改文件 Mapper
 *
 * @author hans.zhang
 */
@Mapper
public interface SecurityCheckRectificationFileMapper extends BaseMapperX<SecurityCheckRectificationFileDO> {

    default PageResult<SecurityCheckRectificationFileDO> selectPage(SecurityCheckRectificationFilePageReqVO reqVO) {
        return selectPage(reqVO, new LambdaQueryWrapperX<SecurityCheckRectificationFileDO>()
                .eqIfPresent(SecurityCheckRectificationFileDO::getSecurityCheckId, reqVO.getSecurityCheckId())
                .eqIfPresent(SecurityCheckRectificationFileDO::getFileUrl, reqVO.getFileUrl())
                .likeIfPresent(SecurityCheckRectificationFileDO::getUserName, reqVO.getUserName())
                .betweenIfPresent(SecurityCheckRectificationFileDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(SecurityCheckRectificationFileDO::getId));
    }

}
